Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/practice/community.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function Community({ challenges }) {
<div className="w-full ml-4">
<label
htmlFor="search"
className="block text-sm font-medium leading-5 text-gray-200"
className="block text-sm font-medium border-none leading-5 text-gray-200"
>
Search
</label>
Expand All @@ -122,7 +122,7 @@ export function Community({ challenges }) {
style={{ backgroundColor: '#212121' }}
onChange={search}
placeholder="Search for a Challenge"
className="mt-1 block w-full rounded py-2 pr-40 pl-3 pr-10 text-base leading-6 text-gray-200 focus:outline-none sm:text-sm sm:leading-5"
className="mt-1 block w-full rounded py-2 pr-40 pl-3 pr-10 leading-6 border-none text-white focus:outline-none sm:text-sm sm:leading-5"
></input>
</div>
</div>
Expand Down
36 changes: 19 additions & 17 deletions src/pages/users/[user].jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ import { Fragment } from 'react';
import request from "@/utils/request";

const shades = [
'ml-1 h-5 w-5 bg-green-000',
'ml-1 h-5 w-5 bg-green-100',
'ml-1 h-5 w-5 bg-green-200',
'ml-1 h-5 w-5 bg-green-300',
'ml-1 h-5 w-5 bg-green-400',
'ml-1 h-5 w-5 bg-green-500',
'ml-1 h-5 w-5 bg-green-600',
'ml-1 h-5 w-5 bg-green-700',
'ml-1 h-5 w-5 bg-green-800',
'ml-1 h-5 w-5 bg-green-900',
'ml-1 h-5 w-5 bg-neutral-900',
'ml-1 h-5 w-5 bg-blue-100',
'ml-1 h-5 w-5 bg-blue-200',
'ml-1 h-5 w-5 bg-blue-300',
'ml-1 h-5 w-5 bg-blue-400',
'ml-1 h-5 w-5 bg-blue-500',
'ml-1 h-5 w-5 bg-blue-600',
'ml-1 h-5 w-5 bg-blue-700',
'ml-1 h-5 w-5 bg-blue-800',
'ml-1 h-5 w-5 bg-blue-900',
];

export default function Users() {
Expand Down Expand Up @@ -90,11 +90,11 @@ export default function Users() {

const [selectedBanner, setSelectedBanner] = useState(null);
const [isBannerPopupOpen, setIsBannerPopupOpen] = useState(false);
const [banner, setBanner] = useState('https://images.unsplash.com/photo-1500964757637-c85e8a162699?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=3903&q=80');
const [banner, setBanner] = useState('https://images.unsplash.com/photo-1633259584604-afdc243122ea?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80');

const [selectedImage, setSelectedImage] = useState(null);
const [isPopupOpen, setIsPopupOpen] = useState(false);
const [pfp, setPfp] = useState(`https://robohash.org/KshitijIsCool.png?set=set1&size=150x150`);
const [pfp, setPfp] = useState(process.env.NEXT_PUBLIC_FRONTEND_URL + `ConfusedKana.png`);
const [isLoggedIn, setIsLoggedIn] = useState(null);

const handleImageChange = (event) => {
Expand Down Expand Up @@ -482,7 +482,11 @@ export default function Users() {
const result = await request(endPoint, "GET", null);
console.log(result)
if (result) {
setBanner(result)
if (result !== "https://images.unsplash.com/photo-1500964757637-c85e8a162699?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=3903&q=80") {
setBanner(result)

}

} else {
setBanner('https://images.unsplash.com/photo-1500964757637-c85e8a162699?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=3903&q=80')
}
Expand Down Expand Up @@ -1038,10 +1042,8 @@ export default function Users() {
<div className="flex items-center justify-center">
{['', '', '', '', '', '', ''].map((e, j) => (
<div
style={{
marginBottom: '2px',
}}
className={`${shades[activity[idx + j]]}`}

className={`${shades[activity[idx + j]]} mt-1`}
></div>
))}
</div>
Expand Down