Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits committed Feb 28, 2024
2 parents 0137725 + b2e2c01 commit 8e00836
Show file tree
Hide file tree
Showing 25 changed files with 357 additions and 116 deletions.
28 changes: 7 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
FROM ubuntu:22.04 as build
FROM node:18-alpine

LABEL maintainer="SDF Ops Team <[email protected]>"

RUN mkdir -p /app
ENV NEXT_TELEMETRY_DISABLED 1
ENV PORT 80
WORKDIR /app

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \
echo "deb https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn && apt-get clean


COPY . /app/
RUN yarn git-info
COPY . .
RUN yarn install
RUN yarn build

FROM nginx:1.17

COPY --from=build /app/build/ /usr/share/nginx/html/
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
# Run on port 80 for compatibility with laboratory v1
EXPOSE 80
CMD ["npm", "start"]
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: "export",
distDir: "build",
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"git-info": "rm -rf src/generated/ && mkdir src/generated/ && echo export default \"{\\\"commitHash\\\": \\\"$(git rev-parse --short HEAD)\\\", \\\"version\\\": \\\"$(git describe --tags --always)\\\"};\" > src/generated/gitInfo.ts"
},
"dependencies": {
"@stellar/design-system": "^2.0.0-beta.4",
"@stellar/design-system": "^2.0.0-beta.5",
"@tanstack/react-query": "^5.24.1",
"@tanstack/react-query-devtools": "^5.24.1",
"dompurify": "^3.0.9",
Expand Down
11 changes: 1 addition & 10 deletions src/app/(sidebar)/account/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
"use client";

import { useStore } from "@/store/useStore";

export default function CreateAccount() {
const { network } = useStore();

return (
<div>
Create Account
<div>{`Current network: ${network?.id}`}</div>
</div>
);
return <div>Create Account</div>;
}
71 changes: 1 addition & 70 deletions src/app/(sidebar)/account/fund/page.tsx
Original file line number Diff line number Diff line change
@@ -1,74 +1,5 @@
"use client";

import { useStore } from "@/store/useStore";
import { Input, Button, Select } from "@stellar/design-system";
import { useState } from "react";

export default function FundAccount() {
const {
account: { value, update, updateNested, reset },
} = useStore();

const [testValue, setTestValue] = useState(value);

const handleUpdateNested = (event: any) => {
const val = event.target.value;
let submitValue = {
nestedValue1: "AAA",
nestedValue2: 111,
};

if (val === "Two") {
submitValue = {
nestedValue1: "BBB",
nestedValue2: 222,
};
}

updateNested(submitValue);
};

return (
<div>
Fund Account
<div>
<div>{`Test value: ${value}`}</div>

<p>Store value is updated on blur</p>

<Input
id="test-1"
fieldSize="sm"
value={testValue}
onChange={(event) => setTestValue(event.target.value)}
onBlur={(event) => update(event.target.value)}
label="Value"
/>

<p>Testing nested object update</p>

<Select
id="select-1"
fieldSize="sm"
onChange={handleUpdateNested}
label="Nested value"
>
<option></option>
<option value="One">One</option>
<option value="Two">Two</option>
</Select>

<Button
size="sm"
variant="primary"
onClick={() => {
reset();
setTestValue("");
}}
>
Reset
</Button>
</div>
</div>
);
return <div>Fund Account</div>;
}
5 changes: 0 additions & 5 deletions src/app/(sidebar)/account/page.tsx

This file was deleted.

5 changes: 5 additions & 0 deletions src/app/(sidebar)/explore-endpoints/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function ExploreEndpoints() {
return <div>Explore Endpoints</div>;
}
19 changes: 19 additions & 0 deletions src/app/(sidebar)/explore-endpoints/template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import { LayoutSidebarContent } from "@/components/layout/LayoutSidebarContent";

export default function ExploreEndpointsTemplate({
children,
}: {
children: React.ReactNode;
}) {
return (
<LayoutSidebarContent
sidebar={{
navItems: [],
}}
>
{children}
</LayoutSidebarContent>
);
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/soroban/contract-explorer/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function SorobanContractExplorer() {
return <div>Soroban Contract Explorer</div>;
}
19 changes: 19 additions & 0 deletions src/app/(sidebar)/soroban/template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import { LayoutSidebarContent } from "@/components/layout/LayoutSidebarContent";

export default function TransactionTemplate({
children,
}: {
children: React.ReactNode;
}) {
return (
<LayoutSidebarContent
sidebar={{
navItems: [],
}}
>
{children}
</LayoutSidebarContent>
);
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/transaction/build/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function BuildTransaction() {
return <div>Build Transaction</div>;
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/transaction/fee-bump/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function FeeBumpTransaction() {
return <div>Fee Bump Transaction</div>;
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/transaction/sign/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function SignTransaction() {
return <div>Sign Transaction</div>;
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/transaction/simulate/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function SimulateTransaction() {
return <div>Simulate Transaction</div>;
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/transaction/submit/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function SubmitTransaction() {
return <div>Submit Transaction</div>;
}
41 changes: 41 additions & 0 deletions src/app/(sidebar)/transaction/template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"use client";

import { LayoutSidebarContent } from "@/components/layout/LayoutSidebarContent";
import { Routes } from "@/constants/routes";

export default function TransactionTemplate({
children,
}: {
children: React.ReactNode;
}) {
return (
<LayoutSidebarContent
sidebar={{
navItems: [
{
route: Routes.BUILD_TRANSACTION,
label: "Build Transaction",
},
{
route: Routes.SIGN_TRANSACTION,
label: "Sign Transaction",
},
{
route: Routes.SIMULATE_TRANSACTION,
label: "Simulate Transaction",
},
{
route: Routes.SUBMIT_TRANSACTION,
label: "Submit Transaction",
},
{
route: Routes.FEE_BUMP_TRANSACTION,
label: "Fee Bump",
},
],
}}
>
{children}
</LayoutSidebarContent>
);
}
29 changes: 29 additions & 0 deletions src/app/(sidebar)/xdr/template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"use client";

import { LayoutSidebarContent } from "@/components/layout/LayoutSidebarContent";
import { Routes } from "@/constants/routes";

export default function XdrTemplate({
children,
}: {
children: React.ReactNode;
}) {
return (
<LayoutSidebarContent
sidebar={{
navItems: [
{
route: Routes.VIEW_XDR,
label: "View XDR",
},
{
route: Routes.TO_XDR,
label: "To XDR",
},
],
}}
>
{children}
</LayoutSidebarContent>
);
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/xdr/to/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function ToXdr() {
return <div>To XDR</div>;
}
5 changes: 5 additions & 0 deletions src/app/(sidebar)/xdr/view/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use client";

export default function ViewXdr() {
return <div>View XDR</div>;
}
Loading

0 comments on commit 8e00836

Please sign in to comment.