Skip to content

Commit

Permalink
feat(charity): add new app for charity (#159)
Browse files Browse the repository at this point in the history
* feat(charity): add new app for charity

* feat(charity): remove and reinstall packages

* fix(ui): nav item style
  • Loading branch information
abbylow authored Aug 30, 2023
1 parent b63fab7 commit d1094a5
Show file tree
Hide file tree
Showing 56 changed files with 13,582 additions and 14,847 deletions.
17 changes: 17 additions & 0 deletions apps/charity/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
extends: '@mantle/eslint-config-next',
settings: {
next: {
rootDir: ['apps/*/'],
},
},
rules: {
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
},
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
}
37 changes: 37 additions & 0 deletions apps/charity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
5 changes: 5 additions & 0 deletions apps/charity/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": true,
"tabWidth": 2,
"useTabs": false
}
4 changes: 4 additions & 0 deletions apps/charity/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "../../node_modules/.pnpm/[email protected]/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
3 changes: 3 additions & 0 deletions apps/charity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# App Template

This app is about minting NFT for Selini poker night.
28 changes: 28 additions & 0 deletions apps/charity/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: ["@design-system/ui"],
images: {
domains: [
"token-list.mantle.xyz",
"safe-transaction-assets.gnosis-safe.io",
"safe-transaction-assets.safe.global",
"static.alchemyapi.io",
],
},
experimental: {
appDir: true,
scrollRestoration: true,
},
async redirects() {
return [
{
source: "/",
destination: "/chivalries-of-mantle",
permanent: false,
},
];
},
};

module.exports = nextConfig;
44 changes: 44 additions & 0 deletions apps/charity/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "mantle-charity",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "next dev --port 3009",
"build": "next build",
"test": "echo 'Running charity tests'",
"start": "next start --port 3009",
"lint": "eslint src --fix",
"dev:charity": "next dev --port 3009",
"lint:charity": "eslint src --fix"
},
"dependencies": {
"@ethersproject/providers": "^5.7.2",
"@headlessui/react": "^1.7.13",
"@mantle/constants": "workspace:*",
"@mantle/ui": "workspace:*",
"@mantle/utils": "workspace:*",
"@tanstack/react-query": "^4.14.5",
"ethers": "^5.7.2",
"framer-motion": "^10.12.10",
"next": "13.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
"wagmi": "^1.3.9",
"zustand": "^4.0.0-rc.1"
},
"devDependencies": {
"@mantle/eslint-config-next": "workspace:*",
"@mantle/tailwind-config": "workspace:*",
"@mantle/tsconfig": "workspace:*",
"@types/node": "18.11.3",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
"autoprefixer": "^10.4.12",
"clsx": "^1.2.1",
"eslint": "^8.30.0",
"postcss": "^8.4.18",
"tailwindcss": "^3.2.1",
"typescript": "5.0.4"
}
}
6 changes: 6 additions & 0 deletions apps/charity/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added apps/charity/public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/bg/bg-header-desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/bg/bg-ipad-mini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/bg/bg-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/bg/bg-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions apps/charity/public/bitdao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/favicon.ico
Binary file not shown.
72 changes: 72 additions & 0 deletions apps/charity/public/mantle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/opengraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/preloader_animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/preloader_animation_160.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/charity/public/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/charity/src/app/chivalries-of-mantle/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Page components
export default async function Page() {
return <>TODO</>;
}
33 changes: 33 additions & 0 deletions apps/charity/src/app/head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {
ABSOLUTE_PATH,
APP_NAME,
META,
OG_TITLE,
TWITTER_DESC,
TWITTER_TITLE,
} from "@config/constants";
import { Cookies } from "@mantle/ui";

export default function Head() {
return (
<>
<title>{APP_NAME}</title>
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta property="og:type" content="website" />
<meta property="og:title" content={`${OG_TITLE}`} />
<meta property="og:image" content={`${ABSOLUTE_PATH}/opengraph.png`} />
<meta name="description" content={`${META}`} />

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@0xMantle" />
<meta name="twitter:title" content={`${TWITTER_TITLE}`} />
<meta name="twitter:creator" content="@0xMantle" />
<meta name="twitter:description" content={`${TWITTER_DESC}`} />
<meta name="twitter:image" content={`${ABSOLUTE_PATH}/twitter.png`} />
<meta name="google" content="nositelinkssearchbox" />
<Cookies siteId="302" />
</>
);
}
54 changes: 54 additions & 0 deletions apps/charity/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import "./styles/globals.css";

// Dummy components
import {
GTWalsheim,
PageWrapper,
// PageBackroundImage,
PageContainer,
SlimFooter,
} from "@mantle/ui";

import Head from "@app/head";
import Providers from "@app/providers";

import Nav from "@components/Nav";
import CONST from "@mantle/constants";

// import bgDesktop from "../../public/bg/bg-header-desktop.png";
// import bgIpad from "../../public/bg/bg-ipad.png";
// import bgIpadMini from "../../public/bg/bg-ipad-mini.png";
// import bgMobile from "../../public/bg/bg-mobile.png";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" className={`${GTWalsheim.className}`}>
<Head />
<body className="antialiased">
{/* @ts-expect-error Server Component */}
<Providers>
<PageWrapper
// TODO: setup different bg image here
// siteBackroundImage={
// <PageBackroundImage
// imgSrc={bgDesktop}
// altDesc="Charity Background Image"
// />
// }
header={<Nav />}
className="min-h-screen justify-between"
>
<PageContainer className="grow items-center">
{children}
</PageContainer>
<SlimFooter url={CONST.WEBSITE} />
</PageWrapper>
</Providers>
</body>
</html>
);
}
5 changes: 5 additions & 0 deletions apps/charity/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Page components

export default async function Page() {
return null;
}
19 changes: 19 additions & 0 deletions apps/charity/src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { WagmiProvider } from "@providers/wagmiContext";
import { StateProvider } from "@providers/stateContext";
import WalletProvider from "@providers/walletProvider";

// TODO: remove unused providers
export default async function Providers({
children,
}: {
children: React.ReactNode;
}) {
return (
<WagmiProvider>
<StateProvider>
<WalletProvider />
{children}
</StateProvider>
</WagmiProvider>
);
}
Loading

3 comments on commit d1094a5

@vercel
Copy link

@vercel vercel bot commented on d1094a5 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ethcc – ./apps/events

ethcc-mantle-xyz.vercel.app
ethcc-mantle.vercel.app
ethcc-git-main-mantle-xyz.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d1094a5 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on d1094a5 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mantle-bridge – ./apps/bridge

mantle-bridge-git-main-mantle-xyz.vercel.app
mantle-bridge.vercel.app
mantle-bridge-mantle-xyz.vercel.app
bridge.mantle.xyz

Please sign in to comment.