아따 대가리 깨지네
예시 만듬
This commit is contained in:
BIN
frontend/app/favicon.ico
Normal file
BIN
frontend/app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | 크기: 25 KiB |
21
frontend/app/globals.css
Normal file
21
frontend/app/globals.css
Normal file
@@ -0,0 +1,21 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--foreground);
|
||||
background: var(--background);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
34
frontend/app/layout.tsx
Normal file
34
frontend/app/layout.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
33
frontend/app/page.tsx
Normal file
33
frontend/app/page.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
"use client"
|
||||
import Image from "next/image";
|
||||
import {Greet} from "@/wailsjs/go/main/App";
|
||||
import { main } from "@/wailsjs/go/models";
|
||||
import {useState} from "react";
|
||||
|
||||
export default function Home() {
|
||||
const [result, setResult] = useState('Please enter your name below 👇')
|
||||
const person = new main.Person();
|
||||
person.age= 11;
|
||||
person.name="dd";
|
||||
|
||||
return <>
|
||||
{result}
|
||||
<button
|
||||
onClick={() => {
|
||||
try {
|
||||
Greet(person)
|
||||
.then(result => {
|
||||
setResult(result)
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}}>
|
||||
Greet
|
||||
</button>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user