Skip to content

Commit

Permalink
Refactor Logo component and fix link href formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wraith2009 committed Sep 28, 2024
1 parent a550ce0 commit dba50b6
Show file tree
Hide file tree
Showing 17 changed files with 300 additions and 290 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DISCLAIMER

### We have ended up rewriting the commit history due to a faulty commit, let's take this as a learning to double check our triple checks before making a PR, just to get a PR merged you don't have to rush, you have ample time to work on an issue once assigned, depending on the magnitude of the issue, anyways due to the same you have to take a fresh fork if you are a recurring contributor and if you are a new contributor, do keep this in mind and start contributing, you are good to go
### We have ended up rewriting the commit history due to a faulty commit, let's take this as a learning to double check our triple checks before making a PR, just to get a PR merged you don't have to rush, you have ample time to work on an issue once assigned, depending on the magnitude of the issue, anyways due to the same you have to take a fresh fork if you are a recurring contributor and if you are a new contributor, do keep this in mind and start contributing, you are good to go

# Project Name: Tiplink

Expand Down Expand Up @@ -45,14 +45,14 @@ Using Docker:
```bash
cd tiplink
```
3. Create a .env file in the root folder of your project. Update it following the convention of the .env.example file.
3. Create a .env file in the root folder of your project. Update it following the convention of the .env.example file.
Here's an example:
```bash
CLIENT_SECRET = '' #Get it from Google developers console
CLIENT_ID = '' #Get it from Google developers console
NEXTAUTH_SECRET = ''
NEXTAUTH_SECRET = ''
NEXTAUTH_URL = '' #Your frontend base URL
#DATABASE_URL = 'postgresql://postgres:password@localhost:5432/mydatabase'
#DATABASE_URL = 'postgresql://postgres:password@localhost:5432/mydatabase'
DATABASE_URL = 'postgresql://postgres:password@postgres:5432/mydatabase' #Use this for setting up docker
NEXT_PUBLIC_SOLANA_RPC = '' #Your Custom Solana RPC URL
```
Expand All @@ -72,11 +72,12 @@ Using Docker:
```bash
docker compose up
```
Without Docker
Without Docker
### Without Docker
1. clone the repository:
```bash
git clone https://github.com/code100x/tiplink.git
```
Expand Down Expand Up @@ -122,12 +123,14 @@ Contributions are welcome! If you'd like to contribute to the Tiplink project, p

## Resource Reference Section for various pieces of the project

### For reading up on AWS KMS:
### For reading up on AWS KMS:

- [AWS KMS Docs](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/js-examples.html)
- [Data Encryption on AWS](https://enlear.academy/data-encryption-on-aws-8d6be6033351)
- [AWS Encryption SDK Guide](https://enlear.academy/aws-encryption-sdk-d38bfae40e9f)

### For reading up on GCP KMS:
### For reading up on GCP KMS:

- [GCP KMS Docs](https://cloud.google.com/nodejs/docs/reference/kms/latest)
- [Video Guide for GCP on Google Cloud Tech](https://www.youtube.com/watch?v=WKZC93y-aWI)

Expand All @@ -138,9 +141,9 @@ Please take an updated pull from the dev branch, and request branches for furthe
- **main** - Stable branch
- **dev** - Branch for all the developer changes (Where your code will reside before moving to production)
- **dev-backend**- Branch for all developer changes in the backend
- **dev-backend/*** - Branch for changes in specific features within the backend
- **dev-backend/\*** - Branch for changes in specific features within the backend
- **dev-frontend** - Branch for all developer changes in the frontend
- **dev-frontend/*** - Branch for changes in specific features within the frontend
- **dev-frontend/\*** - Branch for changes in specific features within the frontend

## License

Expand Down
10 changes: 5 additions & 5 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export default function RootLayout({
return (
<html lang="en">
<Providers>
<AppWalletProvider>
<body className={`${inter.className} h-[100vh]`}>
<NextTopLoader color="#333" />
<AppWalletProvider>
<body className={`${inter.className} h-[100vh]`}>
<NextTopLoader color="#333" />
{children}
</body>
</AppWalletProvider>
</body>
</AppWalletProvider>
</Providers>
</html>
)
Expand Down
3 changes: 1 addition & 2 deletions src/app/wallet/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ const Wallet = async () => {
},
})
if (user) {
wallet = user?.publicKey ? user.publicKey : await createWallet(user)
wallet = user?.publicKey ? user.publicKey : await createWallet(user)
balance = await fetchUserBalance(wallet)
console.log(balance)
}
}


return (
<div className="h-full flex flex-col items-center">
<TopBar />
Expand Down
1 change: 0 additions & 1 deletion src/components/Appbar/ProfileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const ProfileHeader = () => {
<div className="flex items-center gap-4">
{isUSer ? (
<Button size="sm" variant="outline">

Sign out
</Button>
) : (
Expand Down
4 changes: 3 additions & 1 deletion src/components/WalletPage/LeftSideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ const LeftSideBar = () => {
key={index}
className={cn(
'flex items-center gap-2 w-full space-x-3 sm:p-3 hover:bg-black hover:text-white rounded-lg',
pathName === option?.href ? 'sm:bg-black text-white' : 'text-black',
pathName === option?.href
? 'sm:bg-black text-white'
: 'text-black',
)}
>
{option.svg}
Expand Down
17 changes: 10 additions & 7 deletions src/components/WalletPage/RightSideBar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"
'use client'

import { signOut } from "next-auth/react";
import { useRouter } from "next/navigation"
import { signOut } from 'next-auth/react'
import { useRouter } from 'next/navigation'

const RightSideBar = () => {
const router = useRouter();
const router = useRouter()

return (
<div className="pr-6">
Expand Down Expand Up @@ -112,9 +112,12 @@ const RightSideBar = () => {
</svg>
<p>Blogs</p>
</button>
<button className="flex space-x-3 p-2 text-white hover:bg-gray-800 rounded-lg md:text-sm" onClick={async()=>{
await signOut({callbackUrl:"/"});
}}>
<button
className="flex space-x-3 p-2 text-white hover:bg-gray-800 rounded-lg md:text-sm"
onClick={async () => {
await signOut({ callbackUrl: '/' })
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
Expand Down
11 changes: 8 additions & 3 deletions src/components/WalletPage/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ const TopBar = () => {
</div>

<div className="hidden sm:flex sm:w-1/2 md:w-[50%] items-center border rounded-full p-2">
<Search color='gray' />
<input className="w-full text-center outline-none" placeholder="Search" />
<Search color="gray" />
<input
className="w-full text-center outline-none"
placeholder="Search"
/>
</div>
{data && data?.user ? <ProfileDropDown /> : (
{data && data?.user ? (
<ProfileDropDown />
) : (
<div className="w-[3rem] flex items-center p-[0.2rem] justify-center h-[2rem] transition outline-none">
<div className="p-4 border-2 rounded-full bg-gray-300 animate-pulse"></div>
</div>
Expand Down
74 changes: 36 additions & 38 deletions src/components/WalletPage/WalletDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const actions = [
]

interface WalletDetailProps {
wallet?: string;
wallet?: string
balance?: number
}

Expand All @@ -23,13 +23,13 @@ const WalletDetail = ({ wallet, balance }: WalletDetailProps) => {
</p>
</div>
<div className="font-bold text-black opacity-80 text-xl sm:text-4xl mb-6">
{balance === null ? (
<div className=" bg-gray-200 rounded-lg animate-pulse w-[46px] h-[34px] mb-6">
{''}
</div>
) : (
`$ ${balance}`
)}
{balance === null ? (
<div className=" bg-gray-200 rounded-lg animate-pulse w-[46px] h-[34px] mb-6">
{''}
</div>
) : (
`$ ${balance}`
)}
</div>
</div>

Expand All @@ -41,39 +41,37 @@ const WalletDetail = ({ wallet, balance }: WalletDetailProps) => {
{action.icon}
</button>
<p>{action.label}</p>
</div>
))}
</div>

<div className="flex items-center justify-between bg-gray-200 w-full rounded-[16px] p-[2px]">
<button className="flex justify-center items-center py-3 bg-black opacity-80 rounded-[14px] w-[49%] text-white p-2 text-xl">
Token
</button>

<button className="flex justify-center items-center py-3 opacity-80 rounded-[14px] w-[49%] text-black p-2 text-xl">
NFTs
</button>
</div>
</div>

<div className="w-full">
<div className="p-2">
<p className="flex justify-center text-slate-800 font-bold text-xl pt-4 pb-1">
You don&apos;t have any assets yet!
</p>
<p className="flex justify-center text-gray-300 text-sm pt-2">
Start by buying or depositing funds:
</p>
</div>
<div className="flex justify-center pt-2">
<button className="bg-black opacity-80 rounded-lg text-white font-bold p-3">
+ Add Funds
</button>
</div>
))}
</div>

<div className="flex items-center justify-between bg-gray-200 w-full rounded-[16px] p-[2px]">
<button className="flex justify-center items-center py-3 bg-black opacity-80 rounded-[14px] w-[49%] text-white p-2 text-xl">
Token
</button>

<button className="flex justify-center items-center py-3 opacity-80 rounded-[14px] w-[49%] text-black p-2 text-xl">
NFTs
</button>
</div>
</div>

<div className="w-full">
<div className="p-2">
<p className="flex justify-center text-slate-800 font-bold text-xl pt-4 pb-1">
You don&apos;t have any assets yet!
</p>
<p className="flex justify-center text-gray-300 text-sm pt-2">
Start by buying or depositing funds:
</p>
</div>
<div className="flex justify-center pt-2">
<button className="bg-black opacity-80 rounded-lg text-white font-bold p-3">
+ Add Funds
</button>
</div>
</div>
</div>
)
}
export default WalletDetail


Loading

0 comments on commit dba50b6

Please sign in to comment.