diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 234e511d..00000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["@babel/plugin-transform-runtime"] -} \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore index 90356623..a8ccb251 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ pids *.seed *.pid.lock +# Next +.next + # Directory for instrumented libs generated by jscoverage/JSCover lib-cov @@ -44,9 +47,9 @@ dist/ # Source images # Instructions will be provided to download these from the game -src/images/weapon* -src/images/summon* -src/images/chara* +public/images/weapon* +public/images/summon* +public/images/chara* # Typescript v1 declaration files typings/ diff --git a/.sassrc.js b/.sassrc.js deleted file mode 100644 index 2861019d..00000000 --- a/.sassrc.js +++ /dev/null @@ -1,10 +0,0 @@ -const path = require('path'); -const cwd = process.cwd(); - -module.exports = { - data: '@import "globals";', - 'includePaths': [ - 'node_modules', - 'assets/scss' - ] -} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..c87e0421 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/assets/menu.svg b/assets/menu.svg deleted file mode 100644 index dda04159..00000000 --- a/assets/menu.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/components/AboutModal/index.scss b/components/AboutModal/index.scss new file mode 100644 index 00000000..2a96b969 --- /dev/null +++ b/components/AboutModal/index.scss @@ -0,0 +1,10 @@ +.AboutModal p { + font-size: $font-regular; + line-height: 1.24; + margin: 0; + margin-bottom: $unit * 2; + + &:last-of-type { + margin-bottom: 0; + } +} diff --git a/components/AboutModal/index.tsx b/components/AboutModal/index.tsx new file mode 100644 index 00000000..6c01e75e --- /dev/null +++ b/components/AboutModal/index.tsx @@ -0,0 +1,36 @@ +import React from 'react' +import { createPortal } from 'react-dom' +import api from '~utils/api' + +import Modal from '~components/Modal' +import Overlay from '~components/Overlay' + +import './index.scss' + +interface Props { + close: () => void +} + +const AboutModal = (props: Props) => { + return ( + createPortal( +
Siero is a tool to save and share parties for Granblue Fantasy.
+All you need to do to get started is start adding things. Siero will make a URL and you can share your party with the world.
+If you want to save your parties for safe keeping or to edit them later, you can make a free account.
+
: ''
}
function generateGridImage(position: number) {
- return (weapons[position])
- ?
: ''
}
return (
diff --git a/src/components/GridRepCollection/index.css b/components/GridRepCollection/index.scss
similarity index 100%
rename from src/components/GridRepCollection/index.css
rename to components/GridRepCollection/index.scss
diff --git a/src/components/GridRepCollection/index.tsx b/components/GridRepCollection/index.tsx
similarity index 91%
rename from src/components/GridRepCollection/index.tsx
rename to components/GridRepCollection/index.tsx
index abc9de4e..341c4a83 100644
--- a/src/components/GridRepCollection/index.tsx
+++ b/components/GridRepCollection/index.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import './index.css'
+import './index.scss'
interface Props {}
diff --git a/src/components/Header/index.scss b/components/Header/index.scss
similarity index 100%
rename from src/components/Header/index.scss
rename to components/Header/index.scss
diff --git a/src/components/Header/index.tsx b/components/Header/index.tsx
similarity index 93%
rename from src/components/Header/index.tsx
rename to components/Header/index.tsx
index b84df4bb..a69185e8 100644
--- a/src/components/Header/index.tsx
+++ b/components/Header/index.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'
-import { useHistory, useLocation } from 'react-router-dom'
+import { useNavigate, useLocation } from 'react-router-dom'
import { useCookies } from 'react-cookie'
import Button from '~components/Button'
@@ -15,7 +15,7 @@ const Header = (props: Props) => {
const [username, setUsername] = useState(undefined)
const [cookies, setCookie, removeCookie] = useCookies(['user'])
- let history = useHistory()
+ let navigate = useNavigate()
let location = useLocation()
const route = (pathname: string) => props.navigate(pathname)
@@ -39,13 +39,13 @@ const Header = (props: Props) => {
}
function newParty() {
- props.navigate('/')
+ navigate('/')
}
function logout() {
removeCookie('user')
window.history.replaceState(null, `Grid Tool`, `/`)
- history.go(0)
+ navigate(0)
}
return (
diff --git a/src/components/HeaderMenu/index.scss b/components/HeaderMenu/index.scss
similarity index 100%
rename from src/components/HeaderMenu/index.scss
rename to components/HeaderMenu/index.scss
diff --git a/src/components/HeaderMenu/index.tsx b/components/HeaderMenu/index.tsx
similarity index 100%
rename from src/components/HeaderMenu/index.tsx
rename to components/HeaderMenu/index.tsx
diff --git a/components/LoginModal/index.scss b/components/LoginModal/index.scss
new file mode 100644
index 00000000..ea98dd58
--- /dev/null
+++ b/components/LoginModal/index.scss
@@ -0,0 +1,14 @@
+.LoginForm {
+ #fields {
+ display: flex;
+ flex-direction: column;
+ gap: $unit;
+ }
+ .fieldset {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ margin-bottom: 8px;
+ }
+}
+
diff --git a/src/components/LoginModal/index.tsx b/components/LoginModal/index.tsx
similarity index 93%
rename from src/components/LoginModal/index.tsx
rename to components/LoginModal/index.tsx
index c9b851e3..e7452db1 100644
--- a/src/components/LoginModal/index.tsx
+++ b/components/LoginModal/index.tsx
@@ -8,9 +8,9 @@ import Fieldset from '~components/Fieldset'
import Modal from '~components/Modal'
import Overlay from '~components/Overlay'
-import './index.css'
+import './index.scss'
-import New from '../../../assets/new'
+// import New from '../../../assets/new'
interface Props {
cookies: Cookies
@@ -108,11 +108,11 @@ const LoginModal = (props: Props) => {
return (
createPortal(