Skip to content

Commit cd47a10

Browse files
committed
Update config
1 parent cf986a6 commit cd47a10

File tree

3 files changed

+2
-89
lines changed

3 files changed

+2
-89
lines changed

src/api/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ async function init(prettyPrint: boolean = false, initClients: boolean = true) {
109109
app.runEnvironment = process.env.RunEnvironment as RunEnvironment;
110110
app.environmentConfig =
111111
environmentConfig[app.runEnvironment as RunEnvironment];
112+
console.log(app.environmentConfig.ValidCorsOrigins);
112113
app.setValidatorCompiler(validatorCompiler);
113114
app.setSerializerCompiler(serializerCompiler);
114115

src/common/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const environmentConfig: EnvironmentConfigType = {
134134
/^https:\/\/(?:.*\.)?acmuiuc-digital-signage\.pages\.dev$/,
135135
/^https:\/\/(?:.*\.)?acmuiuc\.pages\.dev$/,
136136
/^https?:\/\/([a-zA-Z0-9-]+\.)*acm\.illinois\.edu$/,
137+
/^https?:\/\/([a-zA-Z0-9-]+\.)*acmuiuc\.org$/,
137138
/http:\/\/localhost:\d+$/,
138139
],
139140
AadValidClientId: "5e08cf0f-53bb-4e09-9df2-e9bdc3467296",

src/ui/pages/linkry/LinkShortener.page.tsx

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -120,95 +120,6 @@ export const LinkShortener: React.FC = () => {
120120
);
121121
};
122122

123-
const renderDelegatedLinks = (link: LinkryGetResponse, index: number) => {
124-
const shouldShow = true;
125-
126-
return (
127-
<Transition
128-
mounted={shouldShow}
129-
transition="fade"
130-
duration={400}
131-
timingFunction="ease"
132-
>
133-
{(styles) => (
134-
<tr
135-
style={{
136-
...styles,
137-
display: shouldShow ? "table-row" : "none",
138-
backgroundColor: index % 2 === 0 ? "#f0f8ff" : "#ffffff",
139-
}}
140-
>
141-
<Table.Td style={wrapTextStyle}>
142-
<Anchor
143-
href={`http://localhost:8080/api/v1/linkry/redir/${link.slug}`}
144-
target="_blank"
145-
>
146-
{" "}
147-
{/* Currently set to localhost for local testing purposes */}
148-
https://go.acm.illinois.edu/{link.slug}
149-
</Anchor>
150-
</Table.Td>
151-
<Table.Td style={wrapTextStyle}>
152-
<Anchor
153-
href={`/api/v1/linkry/redir/${link.slug}`}
154-
target="_blank"
155-
>
156-
{link.redirect}
157-
</Anchor>
158-
</Table.Td>
159-
<Table.Td style={wrapTextStyle}>
160-
{link.access.map((group, index) => (
161-
<Badge
162-
key={index}
163-
color="#999898"
164-
radius="sm"
165-
style={{ marginRight: "2px", marginBottom: "2px" }}
166-
>
167-
{group.trim()} {/* Trim any extra whitespace */}
168-
</Badge>
169-
))}
170-
</Table.Td>
171-
{/* <Table.Td style={wrapTextStyle}>{dayjs(link.createdAt).format('MMM D YYYY hh:mm')}</Table.Td>
172-
<Table.Td style={wrapTextStyle}>{dayjs(link.updatedAt).format('MMM D YYYY hh:mm')}</Table.Td> */}
173-
<Table.Td
174-
style={{
175-
textAlign: "center",
176-
display: "flex",
177-
justifyContent: "center",
178-
alignItems: "center",
179-
}}
180-
>
181-
<ButtonGroup>
182-
{/* <Button component="a" href={`/linkry/edit/${link.id}`}>
183-
Edit
184-
</Button> */}
185-
<Button
186-
component="a"
187-
href={
188-
link.slug
189-
? `/linkry/edit/${encodeURIComponent(link.slug)}?previousPage=${window.location.pathname}`
190-
: "#"
191-
}
192-
>
193-
<IconEdit size={16} />
194-
</Button>
195-
<Button
196-
color="red"
197-
onClick={() => {
198-
setDeleteLinkCandidate(link);
199-
open();
200-
}}
201-
>
202-
<IconTrash size={16} />
203-
</Button>
204-
</ButtonGroup>
205-
</Table.Td>
206-
</tr>
207-
)}
208-
</Transition>
209-
);
210-
};
211-
212123
useEffect(() => {
213124
const getEvents = async () => {
214125
setIsLoading(true);

0 commit comments

Comments
 (0)