Skip to content
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

Production deployment #459

Merged
merged 1 commit into from
Mar 24, 2024
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
6 changes: 3 additions & 3 deletions app/src/app/(app)/spynet/search/_components/Citizen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {
const Citizen = ({ hit }: Readonly<Props>) => {
return (
<Link href={`/spynet/entity/${hit.objectID}`} prefetch={false}>
{hit.handles.length > 0 ? (
{hit.handles && hit.handles.length > 0 ? (
<span className="flex gap-2 items-baseline">
<p>{hit.handles[0]}</p>

Expand All @@ -23,13 +23,13 @@ const Citizen = ({ hit }: Readonly<Props>) => {
)}

<span className="block text-sm text-neutral-500 mt-2">
{hit.communityMonikers.length > 0 && (
{hit.communityMonikers && hit.communityMonikers.length > 0 && (
<p>Community Monikers: {hit.communityMonikers.join(", ")}</p>
)}

<p>Spectrum ID: {hit.spectrumId}</p>

{hit.citizenIds.length > 0 && (
{hit.citizenIds && hit.citizenIds.length > 0 && (
<p>Citizen IDs: {hit.citizenIds.join(", ")}</p>
)}

Expand Down
6 changes: 3 additions & 3 deletions app/src/app/(app)/spynet/search/_components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Citizen from "./Citizen";
export interface CitizenHit {
objectID: string;
spectrumId: string;
handles: string[];
citizenIds: string[];
communityMonikers: string[];
handles?: string[];
citizenIds?: string[];
communityMonikers?: string[];
}

const searchClient = algoliasearch(
Expand Down
25 changes: 19 additions & 6 deletions app/src/app/_components/CmdK.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
transform: translateX(-50%);
z-index: 40;
background-color: rgb(38 38 38);
padding: 2rem;
padding-bottom: 1rem;
border-radius: 1rem;
width: 640px;
Expand All @@ -23,29 +22,43 @@
padding: 0.5rem;
background-color: rgb(23 23 23);
border-radius: 0.25rem;
width: 100%;
display: block;
margin-bottom: 1rem;
margin-top: 2rem;
margin-left: 2rem;
margin-right: 2rem;
width: calc(100% - 4rem);
}

.cmdk [cmdk-list] {
max-height: 480px;
overflow-y: auto;
}

.cmdk [cmdk-group-heading] {
color: rgb(115 115 115);
padding-left: 1rem;
padding-top: 1rem;
margin-left: -1rem;
margin-right: -1rem;
margin-left: 2rem;
margin-right: 2rem;
}

.cmdk [cmdk-item] {
padding: 1rem;
margin-left: -1rem;
margin-right: -1rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
margin-left: 1rem;
margin-right: 1rem;
}

.cmdk [cmdk-item][data-selected="true"] {
background-color: rgb(64 64 64);
border-radius: 0.25rem;
}

.cmdk [cmdk-empty] {
margin-left: 2rem;
margin-right: 2rem;
}
Loading