forked from Scaffold-Stark/scaffold-stark-2
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
2,515 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build and Deploy to Droplet | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Build and deploy app on server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.DROPLET_IP }} | ||
username: ${{ secrets.DROPLET_USER }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
script: | | ||
cd /var/www/speedrunstark | ||
git pull origin main | ||
pm2 stop speedrunstark | ||
yarn install | ||
cd packages/nextjs | ||
yarn build | ||
pm2 restart speedrunstark | ||
pm2 save |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client"; | ||
|
||
import React, { useEffect, useState } from "react"; | ||
import ReactMarkdown from "react-markdown"; | ||
import { useParams } from "next/navigation"; | ||
|
||
const PageView: React.FC = () => { | ||
const { id } = useParams(); | ||
|
||
const [markdown, setMarkdown] = useState<string>(); | ||
|
||
useEffect(() => { | ||
const getMarkdown = async () => { | ||
const response = await fetch( | ||
`https://raw.githubusercontent.com/Quantum3-Labs/speedrunstark/${id}/README.md`, | ||
); | ||
const markdownData = await response.text(); | ||
setMarkdown(markdownData); | ||
}; | ||
|
||
getMarkdown(); | ||
}, [id]); | ||
return ( | ||
<div className=" flex items-center w-full justify-center sm:text-[12px] "> | ||
<div className="max-w-[800px] py-20 sm:max-w-[400px] sm:py-5 sm:px-5 "> | ||
<ReactMarkdown>{markdown}</ReactMarkdown> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PageView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
interface ButtonProps { | ||
onClick: () => void; | ||
children: ReactNode; | ||
} | ||
|
||
const Button: React.FC<ButtonProps> = ({ onClick, children }) => { | ||
return ( | ||
<button | ||
className="py-[10px] px-[20px] sm:px-[10px] sm:py-[5px] bg-base-300 text-base-100 rounded-[8px] sm:text-[12px]" | ||
onClick={onClick} | ||
type="button" | ||
> | ||
{children} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
Oops, something went wrong.