-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create the gift app PE-5161 #3
Changes from 18 commits
ba96584
f314d33
feb9145
c060653
1310931
d3bdd3b
a1c4b8d
9ed2628
ddb12e5
22279b0
f195cad
72d5b9b
5e88682
1a6e16a
ef55749
9f3af3b
f54b86d
5110240
73ce0b4
f3cab45
b65095a
ae781d5
cbeb926
a1521d2
c68a69f
3e90b1e
f32c254
c6bd0a4
c50121a
1274b4b
f40ddc5
0e4a1f1
db64361
3486930
2e6dbe3
7440377
f8ba419
1ffcac2
f8ab20a
ac5f70b
ec02b7b
fda5143
30b9b3e
13e5a6b
5993e0b
68d7b57
0dadc95
1e4a281
8f26c96
1889063
6390ec9
8df7a2e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Build and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [18.x, 20.x] | ||
command: ["lint", "format", "build", "test"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
run: yarn --immutable --immutable-cache | ||
|
||
- run: yarn ${{ matrix.command }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- prod | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
run: yarn --immutable --immutable-cache | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Deploy gh-pages if on prod | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="The ArDrive Turbo Web App" /> | ||
<link rel="stylesheet" href="/font.css" /> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-66Book.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-95SemiBold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-128Bold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-158ExtraBold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<title>ArDrive Turbo App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="The ArDrive Turbo Web App" /> | ||
<link rel="stylesheet" href="/font.css" /> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-66Book.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-95SemiBold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-128Bold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<link | ||
rel="preload" | ||
href="/fonts/Wavehaus/Wavehaus-158ExtraBold.woff" | ||
as="font" | ||
type="font/woff" | ||
crossorigin | ||
/> | ||
<title>ArDrive Turbo App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="src/main.tsx"></script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "1.0.0", | ||
"type": "module", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider using |
||
"description": "ArDrive Turbo App", | ||
"homepage": "https://ardriveapp.github.io/turbo-app", | ||
"license": "AGPL-3.0-or-later", | ||
"author": { | ||
"name": "Permanent Data Solutions Inc", | ||
|
@@ -14,7 +15,8 @@ | |
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", | ||
"preview": "vite preview" | ||
"preview": "vite preview", | ||
"test": "echo \"TODO: add tests\" && exit 0" | ||
}, | ||
"dependencies": { | ||
"@ardrive/turbo-sdk": "^1.1.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you test v1.1.1-alpha-1 and see if it removes the need for vite polyfill plugin below? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #7 -- It did not seem to fix the problem there There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all good - will continue validating on that branch |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
font-family: Wavehaus-Book; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.ardrive-logo:hover { | ||
filter: drop-shadow(0 0 2em var(--ardrive-red)); | ||
} | ||
|
||
.alert { | ||
margin: 1rem 0; | ||
padding: 1rem 2rem; | ||
border-radius: 0.5rem; | ||
font-size: 1rem; | ||
font-family: Wavehaus-Extra; | ||
color: var(--ardrive-red); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import "./App.css"; | ||
import { ArDriveLogo } from "./ArDriveLogo"; | ||
import { GiftForm } from "./GiftForm"; | ||
import { useErrorMessage } from "./hooks/useErrorMessage"; | ||
|
||
function App() { | ||
const [errorMessage, setErrorMessage] = useErrorMessage(); | ||
|
||
// TODO: Router for different pages. We only need a gift form for now | ||
|
||
return ( | ||
<> | ||
<ArDriveLogo /> | ||
{errorMessage && ( | ||
<div className="alert alert-danger" role="alert"> | ||
{errorMessage} | ||
</div> | ||
)} | ||
<GiftForm errorCallback={setErrorMessage} /> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw I learned we can add dev dependency
gh-pages
and add a deploy command likeyarn gh-pages
(but this is working and fine)