Skip to content

Commit

Permalink
Merge pull request #60 from radixdlt/minor-style-updates
Browse files Browse the repository at this point in the history
Minor style updates
  • Loading branch information
azizi-a authored Jun 14, 2024
2 parents 8497bcc + c0c4c31 commit ca14e33
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 31 deletions.
14 changes: 10 additions & 4 deletions getting-started/react-js-dapp/src/AccountContext.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { createContext, useContext, useState, useEffect } from 'react';
import { createContext, useContext, useState, useEffect } from "react";
import { DataRequestBuilder } from "@radixdlt/radix-dapp-toolkit";
import { useRdt } from './hooks/useRdt';
import PropTypes from "prop-types";
import { useRdt } from "./hooks/useRdt";

const AccountContext = createContext();
const AccountContext = createContext({});

export const useAccount = () => useContext(AccountContext);

Expand All @@ -24,8 +25,13 @@ export const AccountProvider = ({ children }) => {
}, [rdt]);

return (
<AccountContext.Provider value={{ accounts, setAccounts, selectedAccount, setSelectedAccount }}>
<AccountContext.Provider
value={{ accounts, setAccounts, selectedAccount, setSelectedAccount }}>
{children}
</AccountContext.Provider>
);
};

AccountProvider.propTypes = {
children: PropTypes.node.isRequired,
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const DevModeInstruction = () => {
Before connecting your wallet please follow the steps below.
</p>
</section>
{/* <!-- Heading Section End -->
<!-- Dev Mode Instructions Start --> */}

<div className="dev-mode-instruction-container">
<div className="dev-mode-content-container">
<div className="dev-mode-steps-col">
Expand Down Expand Up @@ -51,15 +50,12 @@ const DevModeInstruction = () => {
</p>
</div>
</div>
{/* <!-- Dev Mode Gif Start --> */}

<div className="dev-mode-gif-container">
<div className="dev-mode-gif">
<img src="src/assets/dev-mode-setup.gif" alt="dev mode setup" />
</div>
</div>

{/* <!-- Dev Mode Gif End --> */}
</div>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function DocumentationSection() {
return (
// <!-- Explore the Docs Start -->
<div className="heading-section">
<h2>Explore further Documentation</h2>
<p className="head-text semi-bold">
Expand All @@ -12,21 +11,18 @@ function DocumentationSection() {
href="https://docs.radixdlt.com/docs"
className="btn-radix-blue"
target="_blank"
rel="noreferrer"
>
rel="noreferrer">
View Radix Docs
</a>
<a
href="https://www.npmjs.com/package/@radixdlt/radix-dapp-toolkit"
className="btn-dark"
target="_blank"
rel="noreferrer"
>
rel="noreferrer">
View dApp Toolkit
</a>
</div>
</div>
// <!-- Explore the Docs End -->
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HelloTokenSection = () => {
} else {
setEnableButtons(false);
}
}, [accounts]); // Only re-run the effect if count changes
}, [accounts]);

return (
<>
Expand All @@ -24,6 +24,7 @@ const HelloTokenSection = () => {
Claim your <span className="hello-token-pink">Hello Token</span>
</p>
</div>

<div className="hello-token-container">
<div className="hello-token-left-col">
<h3>Have you Setup Dev Mode?</h3>
Expand All @@ -43,15 +44,15 @@ const HelloTokenSection = () => {
/>
</div>
<div className="hello-tokens-img-container">
{/* <!-- vert-bar --> */}
<div
className="vertical-bar"
style={{
width: 0,
height: "60%",
opacity: 0.3,
borderLeft: "1px solid white",
}}></div>
{/* <!-- vert-bar --> */}
}}
/>
<div className="hello-tokens">
<img src="src/assets/hello-tokens.png" alt="hello tokens" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const DevModeInstruction = () => {
Before connecting your wallet please follow the steps below.
</p>
</section>
{/* <!-- Heading Section End -->
<!-- Dev Mode Instructions Start --> */}

<div className="dev-mode-instruction-container">
<div className="dev-mode-content-container">
<div className="dev-mode-steps-col">
Expand Down Expand Up @@ -51,15 +50,12 @@ const DevModeInstruction = () => {
</p>
</div>
</div>
{/* <!-- Dev Mode Gif Start --> */}

<div className="dev-mode-gif-container">
<div className="dev-mode-gif">
<img src="src/assets/dev-mode-setup.gif" alt="dev mode setup" />
</div>
</div>

{/* <!-- Dev Mode Gif End --> */}
</div>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const DocumentationSection = () => {
return (
// <!-- Explore the Docs Start -->
<div className="heading-section">
<h2>Explore further Documentation</h2>
<p className="head-text semi-bold">
Expand All @@ -24,7 +23,6 @@ const DocumentationSection = () => {
</a>
</div>
</div>
// <!-- Explore the Docs End -->
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HelloTokenSection = () => {
} else {
setEnableButtons(false);
}
}, [accounts]); // Only re-run the effect if count changes
}, [accounts]);

return (
<>
Expand All @@ -24,6 +24,7 @@ const HelloTokenSection = () => {
Claim your <span className="hello-token-pink">Hello Token</span>
</p>
</div>

<div className="hello-token-container">
<div className="hello-token-left-col">
<h3>Have you Setup Dev Mode?</h3>
Expand All @@ -43,15 +44,15 @@ const HelloTokenSection = () => {
/>
</div>
<div className="hello-tokens-img-container">
{/* <!-- vert-bar --> */}
<div
className="vertical-bar"
style={{
width: 0,
height: "60%",
opacity: 0.3,
borderLeft: "1px solid white",
}}></div>
{/* <!-- vert-bar --> */}
}}
/>
<div className="hello-tokens">
<img src="src/assets/hello-tokens.png" alt="hello tokens" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ mod candy_store {
pub fn mint_staff_badge(&mut self, name: String, number: u64) -> Bucket {
// mint and receive a new staff badge. requires an owner or manager badge
let staff_badge_bucket: Bucket = self.staff_badge_resource_manager.mint_non_fungible(
&NonFungibleLocalId::Integer(number.into()),
&NonFungibleLocalId::integer(number),
StaffBadge {
employee_number: number,
employee_name: name,
Expand Down

0 comments on commit ca14e33

Please sign in to comment.