Skip to content

Commit 11b4d17

Browse files
committed
Fix conditional rendering and component structure
1 parent 1123fb3 commit 11b4d17

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/content/learn/conditional-rendering.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,7 @@ export default function PackingList() {
623623
624624
لاحظ أنه يجب كتابة `importance > 0 && ...` بدلاً من `importance && ...` حتى لا يتم عرض القيمة `0` كنتيجة إذا كانت قيمة `importance` هي `0`.
625625
626-
<<<<<<< HEAD
627-
In this solution, two separate conditions are used to insert a space between the name and the importance label. Alternatively, you could use a Fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
628-
=======
629-
في هذا الحل، يتم استخدام شرطين منفصلين لإدراج مسافة بين الاسم ووسم الأهمية. بدلاً من ذلك، يمكنك استخدام مكوّن الأجزاء (fragment) مع إضافة مسافة في البداية: `importance > 0 && <> <i>...</i></>` أو إضافة مسافة مباشرة داخل عنصر `<i>`: `importance > 0 && <i> ...</i>`.
630-
>>>>>>> 7e65f3516a1cde73237acc2a82ab87c7498d94a0
626+
في هذا الحل، يتم استخدام شرطين منفصلين لإدراج مسافة بين الاسم ووسم الأهمية. بدلاً من ذلك، يمكنك استخدام مكوّن الأجزاء (Fragment) مع إضافة مسافة في البداية: `importance > 0 && <> <i>...</i></>` أو إضافة مسافة مباشرة داخل عنصر `<i>`: `importance > 0 && <i> ...</i>`.
631627
632628
</Solution>
633629

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,7 @@ export default function Square() {
368368

369369
</ConsoleBlock>
370370

371-
<<<<<<< HEAD
372-
React components need to return a single JSX element and not multiple adjacent JSX elements like two buttons. To fix this you can use *Fragments* (`<>` and `</>`) to wrap multiple adjacent JSX elements like this:
373-
=======
374371
تحتاج مكونات React إلى إرجاع عنصر JSX واحد وليس عناصر JSX المجاورة مثل زرين. لإصلاح هذا يمكنك استخدام *الأجزاء* (Fragments) (`<>` و `</>`) لتجميع عناصر JSX المجاورة مثل هذا:
375-
>>>>>>> 7e65f3516a1cde73237acc2a82ab87c7498d94a0
376372

377373
```js {3-6}
378374
export default function Square() {

0 commit comments

Comments
 (0)